package com.dms.modules.user.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Data
@ApiModel("用户评论提交DTO")
public class UserCommentSubmitDTO {
    @NotNull(message = "订单ID不能为空")
    @ApiModelProperty(value = "订单ID", required = true)
    private Long orderId;
    
    @NotNull(message = "商品ID不能为空")
    @ApiModelProperty(value = "商品ID", required = true)
    private Long productId;
    
    @NotNull(message = "评分不能为空")
    @Min(value = 1, message = "评分最小为1")
    @Max(value = 5, message = "评分最大为5")
    @ApiModelProperty(value = "评分(1-5)", required = true)
    private Integer rating;
    
    @Size(max = 500, message = "评价内容不能超过500字")
    @ApiModelProperty("评论内容")
    private String content;
    
    @ApiModelProperty("评论图片")
    private List<String> images;
    
    private List<Long> tagIds;
    
    @ApiModelProperty("是否匿名")
    private Boolean isAnonymous;
    
    private Long userId; // 由系统设置，不需要用户传入
} 